import request from '@/utils/request'
//跳转xintu充电小程序
export const xingtuMiniUrl = (data) => {
  return request({
    url: "/massage/login/xingtuMiniUrl.json",
    headers: {
      isToken: false,
      isOpenId: false,
    },
    method: "post",
    data,
  });
};

// 微信授权登录
export const wxLogin = (data) => {
  return request({
    url: "/massage/login/h5Auth.json",
    headers: {
      isToken: false,
      isOpenId: false,
    },
    method: "post",
    data,
  });
};
// 查询订单信息
export const recordsList = (data) => {
  return request({
    url: "/massage/login/consumerRecords.json",
    headers: {
      isToken: false
    },
    method: "post",
    data,
  });
};
// 查询订单详情
export const recordsDetail = (data) => {
  return request({
    url: "/massage/login/consumerDetail.json",
    headers: {
      isToken: false
    },
    method: "post",
    data,
  });
};

// 查询设备状态
export const deviceStatus = (data) => {
  return request({
    url: "/massage/login/deviceStatus.json",
    headers: {
      isToken: false
    },
    method: "post",
    data,
  });
};

// 查询套餐列表
export const packageRecords = (data) => {
  return request({
    url: "/massage/login/packageRecords.json",
    headers: {
      isToken: false
    },
    method: "post",
    data,
  });
};


//  获取wxJsConfig参数
export const findJsConfigMessage = (data) => {
  return request({
    url: "/free/findJsConfigMessage.json",
    headers: {
      isToken: false
    },
    method: "post",
    data,
  });
};



// 获取jsapi参数
export const unifiedorderMassageChair = (data) => {
  return request({
    url: "/free/unifiedorderMassageChair.json",
    headers: {
      isToken: false
    },
    method: "post",
    data,
  });
};



// 获取订单详情
export const payedOrderDetail = (data) => {
  return request({
    url: "/massage/login/payedOrderDetail.json",
    headers: {
      isToken: false
    },
    method: "post",
    data,
  });
};

// 发送验证码
export const phoneCode = (data) => {
  return request({
    url: "/xt/app/login/verify/code",
    method: "post",
    data,
  });
};

// 验证码登录
export function phoneLogin(mobile, verifyCode) {
  const data = {
    mobile,
    verifyCode,
  }
  return request({
    'url': '/xt/app/login/verify/login',
    headers: {
      isToken: false
    },
    'method': 'post',
    'data': data
  })
}



// 退出登录
export const logout2 = (data) => {
  return request({
    url: `/xt/app/login/verify/logout`,
    method: "post",
    data,
  });
};


// 获取用户详细信息
export function getMonitorInfo(data) {
  return request({
    url: `/xt/app/electric/monitor/info`,
    method: 'post',
    data,
  })
}

// 获取用户详细信息
export function getPowerstation(data) {
  return request({
    url: `/xt/app/electricpowerstation/list`,
    method: 'post',
    data,
  })
}

// 获取订单明细
export function getRecords(data) {
  return request({
    url: `/xt/app/electric/record/list`,
    method: 'post',
    data,
  })
}

// 获取资金明细
export function getTransferRecords(data) {
  return request({
    url: `/xt/app/stb/transfer/list`,
    method: 'post',
    data,
  })
}
